import yayJpg from '../../assets/yay.jpg';
import { Outlet, Link, useNavigate } from "umi"

export default function HomePage() {
  const navigate = useNavigate()

  const fn = () => {
    navigate("/docs")
  }

  return (
    <div>
      <h2>Yay! Welcome to umi!</h2>
      <p>
        <img src={yayJpg} width="388" />
      </p>
      <p>
        To get started, edit <code>pages/index.tsx</code> and save to reload.
      </p>

      <Link to="/docs">to docs</Link>
      <button onClick={fn}>to docs</button>

      <Outlet />
    </div>
  );
}
